package pl.edu.agh.gronoMining.frequentSubgraphFinder.graph;

import java.util.Set;

/**
 * Representation of graph.
 */
public interface Graph {

	/**
	 * Adds node to graph
	 * @param node node to add
	 * @throws GraphException when node is already in graph
	 */
	public void addNode(Node node) throws GraphException;
	
	/**
	 * removes node from graph
	 * @param node node to remove
	 * @throws GraphException when graph does not contain this node
	 */
	public void removeNode(Node node) throws GraphException;
	
	/**
	 * gets node by its id
	 * @param nodeId id of node
	 * @return node or null when no node found
	 */
	public Node getNodeById(int nodeId);
	
	/**
	 * get all nodes of graph
	 * @return set of all nodes
	 */
	public Set<Node> getAllNodes();
	
}
